package ca.llsutherland.squash.gym;

import ca.llsutherland.squash.BaseValidator;
import ca.llsutherland.squash.administrator.AdministratorsValidator;
import ca.llsutherland.squash.domain.Gym;

public class GymsValidator extends BaseValidator{

    public static void validate(Gym expectedGym, Gym actualGym) {
        assertValidDomainObject("Gym should not be null and should have a not null id", actualGym);
        assertValidNamedDomainObject("Gym name should be equal", expectedGym, actualGym);
        assertEquals("Gym slogan should be equal", expectedGym.getSlogan(), actualGym.getSlogan());
        assertEquals("Gym street address should be equal", expectedGym.getStreetAddress(), actualGym.getStreetAddress());
        assertEquals("Gym Phone Numbers should be equal", expectedGym.getPhoneNumber(), actualGym.getPhoneNumber());
        assertNotNull("actual gym administrator should not be null", actualGym.getLastUpdatedBy());
        AdministratorsValidator.validate(expectedGym.getLastUpdatedBy(), actualGym.getLastUpdatedBy());
    }

}
